#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
#define rep(i, a, b) for (int i = (a); i <= (b); i++)
#define per(i, a, b) for (int i = (a); i >= (b); i--)
#define endl '\n'
const int N = 1e5 + 5;

int n, m, q;
int head[N];
int ver[N << 1], Next[N << 1], tot;
void add(int u, int v) {
  ++tot;
  ver[tot] = v;
  Next[tot] = head[u];
  head[u] = tot;
}
int dis[N][2];
struct Node {
  int d, v, s;
  bool operator<(const Node& o) const { return d > o.d; }
};
void dijkstra() {
  memset(dis, 0x3f, sizeof(dis));
  priority_queue<Node> pq;
  pq.push(Node{0, 1, 0});
  dis[1][0] = 0;
  while (pq.size()) {
    Node now = pq.top();
    pq.pop();
    int u = now.v, s = now.s, d = now.d;
    if (d > dis[u][s]) continue;
    for (int i = head[u]; i; i = Next[i]) {
      int v = ver[i];
      if (dis[v][s ^ 1] > dis[u][s] + 1) {
        dis[v][s ^ 1] = dis[u][s] + 1;
        pq.push(Node{dis[v][s ^ 1], v, s ^ 1});
      }
    }
  }
}

int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  cin >> n >> m >> q;
  rep(i, 1, m) {
    int u, v;
    cin >> u >> v;
    add(u, v), add(v, u);
  }
  dijkstra();
  while (q--) {
    int v, l, s;
    cin >> v >> l;
    s = l & 1;
    int d = dis[v][s];
    if (d != 0x3f3f3f3f && d <= l)
      cout << "Yes" << endl;
    else
      cout << "No" << endl;
  }
  return 0;
}